home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-09-30 | 719 b | 33 lines | [TEXT/MACA] |
- \ add background tasks to Neon
- \ 9/29/86 cdn Updated for v2.0 -added curTask & delay
- Decimal
-
- 0 value delay
- 0 value nullcnt
- 0 value curTask
-
- \ the taskList is a queue of background tasks that will be
- \ executed whenever there is a null event.
- 4 Ordered-Col taskList \ up to 4 background tasks
-
- \ add cfa to the task list
- : addTask
- add: taskList ;
-
- \ remove cfa from the task list
- : killTask
- indexof: taskList 0= ?error 152
- remove: tasklist
- curTask size: taskList min -> curTask ;
-
- \ execute the tasks round-robin
- : doTask size: taskList 0= IF exit THEN
- nullcnt
- IF -1 ++> nullcnt exit
- ELSE delay -> nullcnt THEN
- curTask 1+ size: taskList mod
- dup -> curTask
- exec: taskList ;
-
- 'c doTask setIdle: fWind
-